#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <numeric>
#include <ostream>
#include <vector>
using namespace std;

void pnt() {}
// 跟递归不一样
template <typename T, typename... types> void pnt(T first, types... args) {
  cout << first << "\n";
  // cout << sizeof...(types) << "\n";
  // cout << sizeof...(args) << "\n";
  pnt(args...);
}

template <typename T>
inline void mpnt(ostream &os, const string &split, T data) {
  os << data << std::endl;
}
// 跟递归不一样
template <typename T, typename... types>
inline void mpnt(ostream &os, const string &split, T first, types... args) {
  cout << first << split;
  // cout << sizeof...(types) << "\n";
  // cout << sizeof...(args) << "\n";
  mpnt(os, split, args...);
}

template <typename T, typename... Idexs>
void pnt_elems(const T &container, Idexs... idex) {
  pnt(container[idex]...);
}

template <typename T> T mfmax(const initializer_list<T> &list) {
  T tmax = numeric_limits<T>::min();
  for (auto i = list.begin(); i != list.end(); ++i)
    tmax = max(tmax, *i);
  return tmax;
}

// template<
// double mfmax(){}

int main() {
  vector<int> it{1, 2, 3, 4, 5, 6};
  pnt_elems(it, 4, 3, 2, 0);
  string s{"good"};
  pnt(3, s, 8, "nice");

  cout << mfmax({2, 3, 4, 59, 0}) << endl;

  cout << max<double>({1, 2, 3.3, 5.1, 0, -1.3}) << endl;

  mpnt(cout, " | ", "ding", "xue", "jun");
  mpnt(cout, " | ", "ding xue jun");
  return 0;
}